searl_sokwedb
2 months agoFix SWELLING_STATES diagram to reflect db
Karl O. Pinc kop@karlpinc.com [Sun, 7 Jun 2026 02:05:23 +0000 (02:05 +0000)]
Fix SWELLING_STATES diagram to reflect db

2 months agoFix SWELLING_SOURCES diagram to reflect db
Karl O. Pinc kop@karlpinc.com [Sun, 7 Jun 2026 02:04:29 +0000 (02:04 +0000)]
Fix SWELLING_SOURCES diagram to reflect db

2 months agoFix REPRO_STATES diagram to reflect db
Karl O. Pinc kop@karlpinc.com [Sun, 7 Jun 2026 02:02:32 +0000 (02:02 +0000)]
Fix REPRO_STATES diagram to reflect db

2 months agoCreate, document, index, and trigger REPRO_STATES
Karl O. Pinc kop@karlpinc.com [Sun, 7 Jun 2026 01:45:37 +0000 (01:45 +0000)]
Create, document, index, and trigger REPRO_STATES

2 months agoFix animid_column() macro so column cannot be NULL
Karl O. Pinc kop@karlpinc.com [Sun, 7 Jun 2026 01:31:22 +0000 (01:31 +0000)]
Fix animid_column() macro so column cannot be NULL

2 months agoUse eid_primary_key() macro
Karl O. Pinc kop@karlpinc.com [Sat, 6 Jun 2026 21:41:01 +0000 (21:41 +0000)]
Use eid_primary_key() macro

2 months agoCorrectly invoke animid_column() macro
Karl O. Pinc kop@karlpinc.com [Sat, 6 Jun 2026 21:30:15 +0000 (21:30 +0000)]
Correctly invoke animid_column() macro

2 months agoInvoke animid_column() macro with parenthesis
Karl O. Pinc kop@karlpinc.com [Sat, 6 Jun 2026 21:28:58 +0000 (21:28 +0000)]
Invoke animid_column() macro with parenthesis

2 months agoAlphabetize by table name
Karl O. Pinc kop@karlpinc.com [Sat, 6 Jun 2026 21:17:21 +0000 (21:17 +0000)]
Alphabetize by table name

2 months agoCreate REPRO_STATE_CHANGE_SOURCES code table
Karl O. Pinc kop@karlpinc.com [Sat, 6 Jun 2026 21:15:25 +0000 (21:15 +0000)]
Create REPRO_STATE_CHANGE_SOURCES code table

2 months agoCreate PARITIES code table
Karl O. Pinc kop@karlpinc.com [Sat, 6 Jun 2026 21:13:16 +0000 (21:13 +0000)]
Create PARITIES code table

2 months agoCreate LE_CERTAINTIES code table
Karl O. Pinc kop@karlpinc.com [Sat, 6 Jun 2026 21:12:10 +0000 (21:12 +0000)]
Create LE_CERTAINTIES code table

2 months agoCreate ED_CERTAINTIES code table
Karl O. Pinc kop@karlpinc.com [Sat, 6 Jun 2026 21:11:09 +0000 (21:11 +0000)]
Create ED_CERTAINTIES code table

2 months agoCorrect copyright date
Karl O. Pinc kop@karlpinc.com [Sat, 6 Jun 2026 20:31:21 +0000 (20:31 +0000)]
Correct copyright date

2 months agoRemove the ARRIVALS_A.ArAID column and use EID as the primary key
Karl O. Pinc kop@karlpinc.com [Sat, 6 Jun 2026 00:00:32 +0000 (00:00 +0000)]
Remove the ARRIVALS_A.ArAID column and use EID as the primary key

2 months agoIndex and trigger SPECIES_PRESENT
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 23:38:37 +0000 (23:38 +0000)]
Index and trigger SPECIES_PRESENT

2 months agoFix hyperlinks
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 23:26:12 +0000 (23:26 +0000)]
Fix hyperlinks

2 months agoRemove the SPECIES_PRESENT.OSID column and use EID as the primary key
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 23:05:54 +0000 (23:05 +0000)]
Remove the SPECIES_PRESENT.OSID column and use EID as the primary key

2 months agoEVENTS with Behavior = sdb_other_species cannot be related to ROLES row
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 20:42:51 +0000 (20:42 +0000)]
EVENTS with Behavior = sdb_other_species cannot be related to ROLES row

2 months agosdb_other_species events must be "certain"
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 20:10:16 +0000 (20:10 +0000)]
sdb_other_species events must be "certain"

2 months agosdb_other_species events must have a related FOLLOWS row
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 20:09:46 +0000 (20:09 +0000)]
sdb_other_species events must have a related FOLLOWS row

2 months agoWrite triggers for HUMANS
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 19:50:59 +0000 (19:50 +0000)]
Write triggers for HUMANS

2 months agoDocument the sdb_other_species event type's validation rules
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 20:08:52 +0000 (20:08 +0000)]
Document the sdb_other_species event type's validation rules

2 months agoFix hyperlink
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 19:43:30 +0000 (19:43 +0000)]
Fix hyperlink

2 months agoRemove the HUMANS.HuID column and use EID as the primary key
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 19:41:14 +0000 (19:41 +0000)]
Remove the HUMANS.HuID column and use EID as the primary key

2 months agoRemove the GROOM_SCANS_B.GsID column and use EID as the primary key
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 19:33:13 +0000 (19:33 +0000)]
Remove the GROOM_SCANS_B.GsID column and use EID as the primary key

2 months agoRemove GROOMINGS.GrID and use EID as the primary key
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 19:25:10 +0000 (19:25 +0000)]
Remove GROOMINGS.GrID and use EID as the primary key

2 months agoRemove FOOD_EVENTS.FEID and use EID as the primary key
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 18:45:20 +0000 (18:45 +0000)]
Remove FOOD_EVENTS.FEID and use EID as the primary key

2 months agoRemove AGGRESSIONS.AgID and use EID as the primary key
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 17:55:49 +0000 (17:55 +0000)]
Remove AGGRESSIONS.AgID and use EID as the primary key

2 months agoAdd triggers for SWELLING_SOURCES
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 17:26:51 +0000 (17:26 +0000)]
Add triggers for SWELLING_SOURCES

2 months agoCorrect "ATTENDANCE after under study" error message
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 17:13:24 +0000 (17:13 +0000)]
Correct "ATTENDANCE after under study" error message

2 months agoFix inequality that broke ATTENDANCE under-study check
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 17:11:12 +0000 (17:11 +0000)]
Fix inequality that broke ATTENDANCE under-study check

2 months agoSpelling
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 17:07:52 +0000 (17:07 +0000)]
Spelling

2 months agoA shorter and more clear error message
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 16:56:02 +0000 (16:56 +0000)]
A shorter and more clear error message

2 months agoIndex the swelling sources on SWELLING_STATES
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 16:33:01 +0000 (16:33 +0000)]
Index the swelling sources on SWELLING_STATES

2 months agoNew build_arrivals_seq() function, in case the auto-building goes wrong
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 16:17:00 +0000 (16:17 +0000)]
New build_arrivals_seq() function, in case the auto-building goes wrong

2 months agoAutomatically maintain ARRIVALS.Seq
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 01:22:25 +0000 (01:22 +0000)]
Automatically maintain ARRIVALS.Seq

2 months agoClarify ARRIVALS.Seq ordering in the docs
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 01:14:00 +0000 (01:14 +0000)]
Clarify ARRIVALS.Seq ordering in the docs

2 months agoRequire an ARRIVALS row have a related ROLES row
Karl O. Pinc kop@karlpinc.com [Thu, 4 Jun 2026 19:38:15 +0000 (19:38 +0000)]
Require an ARRIVALS row have a related ROLES row

2 months agoRemove ARRIVALS.ArID and use EID as the primary key
Karl O. Pinc kop@karlpinc.com [Thu, 4 Jun 2026 18:21:33 +0000 (18:21 +0000)]
Remove ARRIVALS.ArID and use EID as the primary key

ArID is a confusing affection and anti-performant.

2 months agoNew table macro eid_primary_key()
Karl O. Pinc kop@karlpinc.com [Fri, 5 Jun 2026 19:11:12 +0000 (19:11 +0000)]
New table macro eid_primary_key()

Give the user a useful unique index name so they know what to do
when the violate the index's constraint.

2 months agoFix and use correct key column name
Karl O. Pinc kop@karlpinc.com [Thu, 4 Jun 2026 18:18:12 +0000 (18:18 +0000)]
Fix and use correct key column name

2 months agoRemove accidental leftover graphic elements
Karl O. Pinc kop@karlpinc.com [Thu, 4 Jun 2026 18:00:24 +0000 (18:00 +0000)]
Remove accidental leftover graphic elements

2 months agoSimplify because events only fire on update
Karl O. Pinc kop@karlpinc.com [Thu, 4 Jun 2026 18:00:01 +0000 (18:00 +0000)]
Simplify because events only fire on update

2 months agoSupport groom scanning at the feeding station as an EVENTS row
Karl O. Pinc kop@karlpinc.com [Mon, 1 Jun 2026 21:26:21 +0000 (21:26 +0000)]
Support groom scanning at the feeding station as an EVENTS row

Uses the sdb_groom_scan_a EVENTS.Behavior code.  Document rules
and implement.

2 months agoCreate, document, index, and trigger ARRIVALS_A
Karl O. Pinc kop@karlpinc.com [Mon, 1 Jun 2026 20:29:59 +0000 (20:29 +0000)]
Create, document, index, and trigger ARRIVALS_A

This is the feeding station arrival and departure "event detail"
table, that goes with the ATTENDANCE table.  The per-presence,
per-date, information has moved to this table.

2 months agoRemove arrival related information from ATTENDANCE
Karl O. Pinc kop@karlpinc.com [Mon, 1 Jun 2026 20:22:32 +0000 (20:22 +0000)]
Remove arrival related information from ATTENDANCE

2 months agoFix check for unique roles per event
Karl O. Pinc kop@karlpinc.com [Mon, 1 Jun 2026 20:14:14 +0000 (20:14 +0000)]
Fix check for unique roles per event

2 months agoUpdate roles docs to note that roles apply to feeding station attendance
Karl O. Pinc kop@karlpinc.com [Mon, 1 Jun 2026 19:18:25 +0000 (19:18 +0000)]
Update roles docs to note that roles apply to feeding station attendance

2 months agoUpdate diagrams for event based attendance design
Karl O. Pinc kop@karlpinc.com [Mon, 1 Jun 2026 19:09:57 +0000 (19:09 +0000)]
Update diagrams for event based attendance design

Split ATTENDANCE table, creating ARRIVALS_A, an attendance arrival
and departure event table.

2 months agoGrammer
Karl O. Pinc kop@karlpinc.com [Mon, 1 Jun 2026 19:06:15 +0000 (19:06 +0000)]
Grammer

2 months agoUse macro to enforce Certainty = sdb_identity_certain
Karl O. Pinc kop@karlpinc.com [Mon, 1 Jun 2026 19:04:31 +0000 (19:04 +0000)]
Use macro to enforce Certainty = sdb_identity_certain

2 months agoUse macro to enforce Start = Stop
Karl O. Pinc kop@karlpinc.com [Mon, 1 Jun 2026 19:01:22 +0000 (19:01 +0000)]
Use macro to enforce Start = Stop

2 months agoShorten EVENTS.Behavior constraint name to fit within limits
Karl O. Pinc kop@karlpinc.com [Mon, 1 Jun 2026 17:30:22 +0000 (17:30 +0000)]
Shorten EVENTS.Behavior constraint name to fit within limits

Unfortunately, there is not enough space to list the allowed
behavior codes.  The user will just have to refer to the documentaion
when they violate the constraint.

2 months agoAllow the EVENT.Behavior to be sdb_groom_scan
Karl O. Pinc kop@karlpinc.com [Mon, 1 Jun 2026 17:27:23 +0000 (17:27 +0000)]
Allow the EVENT.Behavior to be sdb_groom_scan

2 months agoGive time precision docs their own section
Karl O. Pinc kop@karlpinc.com [Mon, 1 Jun 2026 04:55:59 +0000 (04:55 +0000)]
Give time precision docs their own section

2 months agoHyperlink to tables that have been documented
Karl O. Pinc kop@karlpinc.com [Sun, 31 May 2026 22:00:43 +0000 (22:00 +0000)]
Hyperlink to tables that have been documented

2 months agoMove docs of sdb_actor, sdb_actee, and sdb_mutual into ROLE_CODES
Karl O. Pinc kop@karlpinc.com [Sun, 31 May 2026 21:19:58 +0000 (21:19 +0000)]
Move docs of sdb_actor, sdb_actee, and sdb_mutual into ROLE_CODES

2 months agoUpdate copyright date
Karl O. Pinc kop@karlpinc.com [Sun, 31 May 2026 13:20:10 +0000 (13:20 +0000)]
Update copyright date

2 months agoGrammar
Karl O. Pinc kop@karlpinc.com [Sun, 31 May 2026 13:17:21 +0000 (13:17 +0000)]
Grammar

2 months agoMake sdb_mutual (Mutual) a special ROLE_CODES.Role value
Karl O. Pinc kop@karlpinc.com [Sat, 30 May 2026 00:05:42 +0000 (00:05 +0000)]
Make sdb_mutual (Mutual) a special ROLE_CODES.Role value

When there is one participant with a sdb_mutual role, there must be
at least one other participant with this role.

2 months agoAllow EVENTS and ATTENDANCE to relate, add EVENTS.AtID column
Karl O. Pinc kop@karlpinc.com [Thu, 28 May 2026 17:46:05 +0000 (17:46 +0000)]
Allow EVENTS and ATTENDANCE to relate, add EVENTS.AtID column

2 months agoNew null_xor_null() macro: exactly one of 2 columns must be NULL
Karl O. Pinc kop@karlpinc.com [Thu, 28 May 2026 17:43:02 +0000 (17:43 +0000)]
New null_xor_null() macro: exactly one of 2 columns must be NULL

2 months agoEVENTS is to reference ATTENDANCE, so create ATTENDANCE first
Karl O. Pinc kop@karlpinc.com [Thu, 28 May 2026 17:35:00 +0000 (17:35 +0000)]
EVENTS is to reference ATTENDANCE, so create ATTENDANCE first

2 months agoConvert the follow_map_time_problems table into the clean schema
Karl O. Pinc kop@karlpinc.com [Thu, 28 May 2026 15:00:34 +0000 (15:00 +0000)]
Convert the follow_map_time_problems table into the clean schema

2 months agoWith groom scans, start must equal stop
Karl O. Pinc kop@karlpinc.com [Thu, 28 May 2026 13:04:55 +0000 (13:04 +0000)]
With groom scans, start must equal stop

2 months agoChange table name GROOM_SCANS -> GROOM_SCANS_B
Karl O. Pinc kop@karlpinc.com [Thu, 28 May 2026 00:53:15 +0000 (00:53 +0000)]
Change table name GROOM_SCANS -> GROOM_SCANS_B

2 months agoReplace "estrus" with "swelling", FEMALE_STATES -> REPRO_STATES
Karl O. Pinc kop@karlpinc.com [Thu, 28 May 2026 00:34:56 +0000 (00:34 +0000)]
Replace "estrus" with "swelling", FEMALE_STATES -> REPRO_STATES

2 months agoChange "estrus" to "swelling" in ESTRUS_STATES names
Karl O. Pinc kop@karlpinc.com [Thu, 28 May 2026 00:17:42 +0000 (00:17 +0000)]
Change "estrus" to "swelling" in ESTRUS_STATES names

2 months agoTalk about "swelling" not "estrus" in the CYCLE_STATES docs
Karl O. Pinc kop@karlpinc.com [Wed, 27 May 2026 23:57:36 +0000 (23:57 +0000)]
Talk about "swelling" not "estrus" in the CYCLE_STATES docs

2 months agoChange global constant name sdb_manual_estrus -> sdb_manual_swelling
Karl O. Pinc kop@karlpinc.com [Wed, 27 May 2026 23:53:02 +0000 (23:53 +0000)]
Change global constant name sdb_manual_estrus -> sdb_manual_swelling

2 months agoChange "estrus" to "swelling" in ESTRUS_SOURCES names
Karl O. Pinc kop@karlpinc.com [Wed, 27 May 2026 23:33:32 +0000 (23:33 +0000)]
Change "estrus" to "swelling" in ESTRUS_SOURCES names

2 months agoFix so FOLLOWS.CommID is validated against COMM_IDS
Karl O. Pinc kop@karlpinc.com [Wed, 27 May 2026 19:59:47 +0000 (19:59 +0000)]
Fix so FOLLOWS.CommID is validated against COMM_IDS

2 months agoChange column name: FOLLOWS.Community -> CommID
Karl O. Pinc kop@karlpinc.com [Wed, 27 May 2026 23:46:36 +0000 (23:46 +0000)]
Change column name: FOLLOWS.Community -> CommID

Make consistent with other column names.  Per 2026-05-26 meeting.

2 months agoFix copyright dates
Karl O. Pinc kop@karlpinc.com [Wed, 27 May 2026 19:50:08 +0000 (19:50 +0000)]
Fix copyright dates

2 months agoChange column name: AGGRESSIONS.Community ->CommID
Karl O. Pinc kop@karlpinc.com [Wed, 27 May 2026 19:41:29 +0000 (19:41 +0000)]
Change column name: AGGRESSIONS.Community ->CommID

Make consistent with other column names.  Per 2026-05-26 meeting.

2 months agoChange column name: AGGRESSION_EVENT_LOG.Community ->CommID
Karl O. Pinc kop@karlpinc.com [Wed, 27 May 2026 19:27:09 +0000 (19:27 +0000)]
Change column name: AGGRESSION_EVENT_LOG.Community ->CommID

Make consistent with other column names.  Per 2026-05-26 meeting.

2 months agoCreate, document, index, and trigger ATTENDANCE
Karl O. Pinc kop@karlpinc.com [Wed, 27 May 2026 19:07:02 +0000 (19:07 +0000)]
Create, document, index, and trigger ATTENDANCE

2 months agoIncrease maximum FOOD_EVENTS per EVENTS row
Karl O. Pinc kop@karlpinc.com [Tue, 26 May 2026 19:07:49 +0000 (19:07 +0000)]
Increase maximum FOOD_EVENTS per EVENTS row

Some of the MS Access columns have semi-colons separating food values,
so instead of 2 values to go with the 2 MS Access columns we need
4 possible values.

2 months agoAdd ATTENDANCE to demography ER diagram
Karl O. Pinc [Mon, 25 May 2026 22:54:56 +0000 (17:54 -0500)]
Add ATTENDANCE to demography ER diagram

2 months agoRemove estrus tables from demography ER diagram
Karl O. Pinc [Mon, 25 May 2026 21:55:13 +0000 (16:55 -0500)]
Remove estrus tables from demography ER diagram

2 months agoTable qualify column names for clarity
Karl O. Pinc kop@karlpinc.com [Mon, 25 May 2026 18:22:33 +0000 (18:22 +0000)]
Table qualify column names for clarity

2 months agoCreate, document, index, and trigger GROOM_SCANS
Karl O. Pinc kop@karlpinc.com [Mon, 25 May 2026 18:12:49 +0000 (18:12 +0000)]
Create, document, index, and trigger GROOM_SCANS

2 months agoTypos
Karl O. Pinc kop@karlpinc.com [Mon, 25 May 2026 18:10:17 +0000 (18:10 +0000)]
Typos

2 months agoEVENTS.Start and Stop have semantics that depend on the behavior
Karl O. Pinc kop@karlpinc.com [Mon, 25 May 2026 17:53:15 +0000 (17:53 +0000)]
EVENTS.Start and Stop have semantics that depend on the behavior

2 months agoLink to the detailed description of behavior codes
Karl O. Pinc kop@karlpinc.com [Mon, 25 May 2026 17:51:41 +0000 (17:51 +0000)]
Link to the detailed description of behavior codes

2 months agoAdd GROOM_SCANS to the Events ER diagram
Karl O. Pinc [Mon, 25 May 2026 17:39:47 +0000 (12:39 -0500)]
Add GROOM_SCANS to the Events ER diagram

2 months agoAdjust data integrity rules to allow "other" grooming participants
Karl O. Pinc kop@karlpinc.com [Mon, 25 May 2026 17:24:08 +0000 (17:24 +0000)]
Adjust data integrity rules to allow "other" grooming participants

2 months agoRemoved dropped GROOMINGS.Other column
Karl O. Pinc kop@karlpinc.com [Mon, 25 May 2026 16:55:46 +0000 (16:55 +0000)]
Removed dropped GROOMINGS.Other column

2 months agoRemove index from dropped columns
Karl O. Pinc kop@karlpinc.com [Mon, 25 May 2026 16:52:50 +0000 (16:52 +0000)]
Remove index from dropped columns

2 months agoGeneralize EVENTS.Certainty description
Karl O. Pinc kop@karlpinc.com [Mon, 25 May 2026 16:27:23 +0000 (16:27 +0000)]
Generalize EVENTS.Certainty description

2 months agoDocument Observer check on transaction commit
Karl O. Pinc kop@karlpinc.com [Mon, 25 May 2026 15:00:13 +0000 (15:00 +0000)]
Document Observer check on transaction commit

2 months agoAdd female reproductive ER diagram to docs
Karl O. Pinc kop@karlpinc.com [Mon, 25 May 2026 14:40:24 +0000 (14:40 +0000)]
Add female reproductive ER diagram to docs

2 months agoA ER diagram related to female sexual cycling
Karl O. Pinc [Mon, 25 May 2026 14:29:07 +0000 (09:29 -0500)]
A ER diagram related to female sexual cycling

We'll see if we want to keep this.  For the hot minute, the
estrus states are left on the demography ER diagram.

2 months agoDrop GROOMINGS.Other column
Karl O. Pinc [Sun, 24 May 2026 01:00:01 +0000 (20:00 -0500)]
Drop GROOMINGS.Other column

2 months agoCreate, document, index, and trigger GROOMINGS
Karl O. Pinc kop@karlpinc.com [Sat, 23 May 2026 23:36:03 +0000 (23:36 +0000)]
Create, document, index, and trigger GROOMINGS

2 months agoThe ROLES.Role of sdb_actor and sdb_actee must occur in pairs
Karl O. Pinc kop@karlpinc.com [Sat, 23 May 2026 21:04:40 +0000 (21:04 +0000)]
The ROLES.Role of sdb_actor and sdb_actee must occur in pairs

2 months agoRemove hardcoding of aggression event
Karl O. Pinc kop@karlpinc.com [Thu, 21 May 2026 23:26:38 +0000 (23:26 +0000)]
Remove hardcoding of aggression event

We will need to execute this code to support grooming events.

2 months agoPrevent updates to ROLES.Role
Karl O. Pinc kop@karlpinc.com [Thu, 21 May 2026 23:25:39 +0000 (23:25 +0000)]
Prevent updates to ROLES.Role

2 months agoThere can only be one individual related to a food event
Karl O. Pinc kop@karlpinc.com [Thu, 21 May 2026 23:08:30 +0000 (23:08 +0000)]
There can only be one individual related to a food event